Assign a recent manager if one is set
authorEmmanuele Bassi <ebassi@gnome.org>
Sun, 10 Apr 2016 16:51:58 +0000 (17:51 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 10 Apr 2016 17:35:38 +0000 (18:35 +0100)
The GtkRecentAction implementation ignored a GtkRecentManager passed to
its :manager property.

https://bugzilla.gnome.org/show_bug.cgi?id=620065

gtk/deprecated/gtkrecentaction.c

index 4b1b1b8049d2bab31df7d0a1e54c4ec4c6fb5c1e..3431e3743f6e5d63a9464807959331bd29eef2f5 100644 (file)
@@ -464,7 +464,7 @@ set_recent_manager (GtkRecentAction  *action,
   GtkRecentActionPrivate *priv = action->priv;
 
   if (manager)
-    priv->manager = NULL;
+    priv->manager = manager;
   else
     priv->manager = gtk_recent_manager_get_default ();
 }
@@ -475,8 +475,6 @@ gtk_recent_action_finalize (GObject *gobject)
   GtkRecentAction *action = GTK_RECENT_ACTION (gobject);
   GtkRecentActionPrivate *priv = action->priv;
 
-  priv->manager = NULL;
-  
   if (priv->data_destroy)
     {
       priv->data_destroy (priv->sort_data);
@@ -503,6 +501,8 @@ gtk_recent_action_dispose (GObject *gobject)
       priv->current_filter = NULL;
     }
 
+  priv->manager = NULL;
+  
   G_OBJECT_CLASS (gtk_recent_action_parent_class)->dispose (gobject);
 }